﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MenuGame2DXNA
{

   
    public class VisibleEntityManager : VisibleGameEntity
    {
       
        public VisibleEntityManager()
        {
            ObjectVisible =new List<VisibleGameEntity>();
            nObjectVisible = 0;
        }
        public void AddObject(VisibleGameEntity obj)
        {
            ObjectVisible.Add(obj);
            nObjectVisible++;
        }
        public override void UpdatePositon()
        {
            for (int i = 0; i < nObjectVisible; i++)
            {

                ObjectVisible[i].TopLeft = TopLeft;
            }
        }
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, Microsoft.Xna.Framework.Color color)
        {
            for(int i =0;i<nObjectVisible;i++)
            {

                ObjectVisible[i].Update(gameTime, color);
            }
        }

    }
}
